class Storage {
  static userKey = 'grain_bgms__user';
  setUser(user) {
    localStorage.setItem(Storage.userKey, JSON.stringify(user));
  }
  getUser() {
    const user = localStorage.getItem(Storage.userKey);
    return user ? JSON.parse(user) : null;
  }
  removeUser() {
    localStorage.removeItem(Storage.userKey);
  }
}

export default new Storage();
